import { Component } from 'react'
import HeaderMenu from './Menu'
import { Link } from 'react-router-dom';
// 前端  index.html  - UI(page,component) -action(副作用操作-api-diaptch(action))-action - store(reducers) -mapState,mapDispatch- UI 
// 后端  app - middleware - routes - controller - Model - mysql 

class Header extends Component {


  render() {

    const { currentUser } = this.props
    // console.log("props",this.props.currentUser);
    // console.log("currentUser",currentUser);
    return (
      <nav className="navbar navbar-light">
        <div className="container">
          {/* 左侧 */}
          <Link to='/' className='navbar-brand'>
            BLOG-V1
          </Link>

          {/* 右侧 */}
          <HeaderMenu currentUser={currentUser} />
        </div>
      </nav>
    )
  }
}


export default Header